﻿
/*=========================================
* Author: VIP
* Description: 选中扩展事件
==========================================*/

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;

//[AddComponentMenu("UI/VIPInputField")]
public class VIPInputField : InputField {

    [Serializable]
    public class VIPEvent : UnityEvent { }

    [SerializeField]
    private VIPEvent m_onSelect = new VIPEvent();

    public VIPEvent onStartEdit
    {
        get { return m_onSelect; }
        set { m_onSelect = value; }
    }

    private void SelectPress()
    {
        if (null != m_onSelect)
            m_onSelect.Invoke();
    }

    public override void OnSelect(BaseEventData eventData)
    {
        base.OnSelect(eventData);
        SelectPress();
    }

    internal void OnSelect(object aa)
    {
        throw new NotImplementedException();
    }
}
